#! /usr/bin/env perl


use warnings;
use strict;

die "Usage: isnotrunning Application.app" 
	unless @ARGV == 1;


my $p = shift @ARGV; #"Applications/Safari.app";
my $v = `/bin/ps -ux 2>&1 | grep "$p" | grep -v grep | grep -v isnotrunning`;

if ($v) {
	exit 1;
} else {
	exit 0;
}

